import React, { Component } from 'react'
import { Button } from 'antd'
import { connect } from "react-redux"
import { addBottom } from "../../../redux/actions/bottom"
const mapState = state => ({
    top: state.top
})
const mapDispatch = {
    addBottom
}

class Bottom extends Component {
    addBottom = () => {
        this.props.addBottom(1)
    }
    render() {
        return (
            <div>
                上面的组件值是：{this.props.top}
                <Button onClick={this.addBottom}>点我给上面的组件加1</Button>
            </div>
        )
    }
}

export default connect(mapState, mapDispatch)(Bottom)
